﻿using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options;

namespace Three_Red_Dragon_Mvc.Controllers
{
    /// <summary>
    /// 出库单订单控制器
    /// </summary>
    public class OutboundController : Controller
    {
        private readonly IpAddressesConfig _ipAddressesConfig;

        public OutboundController(IOptions<IpAddressesConfig> ipAddressesConfig)
        {
            _ipAddressesConfig = ipAddressesConfig.Value;
        }
        /// <summary>
        /// 出库单添加视图
        /// </summary>
        /// <returns>返回视图</returns>
        public IActionResult OutboundCreate()
        {
            ViewBag.RBACWrite = _ipAddressesConfig.RBACWrite;
            ViewBag.RedDragonWrite = _ipAddressesConfig.RedDragonWrite;
            return View();
        }
        /// <summary>
        /// 出库单列表视图
        /// </summary>
        /// <returns>返回视图</returns>
        public IActionResult OutboundSearch()
        {
            ViewBag.RBACWrite = _ipAddressesConfig.RBACWrite;
            ViewBag.RedDragonWrite = _ipAddressesConfig.RedDragonWrite;
            return View();
        }
        /// <summary>
        /// 退货单添加视图
        /// </summary>
        /// <returns>返回视图</returns>
        public IActionResult ReturngoodsCreate()
        {
            ViewBag.RBACWrite = _ipAddressesConfig.RBACWrite;
            ViewBag.RedDragonWrite = _ipAddressesConfig.RedDragonWrite;
            return View();
        }
        /// <summary>
        /// 杂项出库添加视图
        /// </summary>
        /// <returns>返回视图</returns>
        public IActionResult MiscellaneousCreate()
        {
            ViewBag.RBACWrite = _ipAddressesConfig.RBACWrite;
            ViewBag.RedDragonWrite = _ipAddressesConfig.RedDragonWrite;
            return View();
        }
        /// <summary>
        /// 出库单修改视图
        /// </summary>
        /// <returns>返回视图</returns>
        public IActionResult OutboundUpdate()
        {
            ViewBag.RBACWrite = _ipAddressesConfig.RBACWrite;
            ViewBag.RedDragonWrite = _ipAddressesConfig.RedDragonWrite;
            return View();
        }
        /// <summary>
        /// 出库单统计表视图
        /// </summary>
        /// <returns>返回视图</returns>
        public IActionResult OutboundStatistics()
        {
            ViewBag.RBACWrite = _ipAddressesConfig.RBACWrite;
            ViewBag.RedDragonWrite = _ipAddressesConfig.RedDragonWrite;
            return View();
        }
    }
}
